package cn.devzyh.oms.wsms.api.feign;

import cn.devzyh.oms.common.core.constant.SecurityConstants;
import cn.devzyh.oms.common.core.constant.ServiceNameConstants;
import cn.devzyh.oms.common.core.util.R;
import cn.devzyh.oms.wsms.api.dto.MatchWarehouseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 仓库相关
 *
 * @author devzyh
 * @date 2024-03-06
 */
@FeignClient(contextId = "remoteWarehouseService", value = ServiceNameConstants.WSMS_SERVICE)
public interface RemoteWarehouseService {

	/**
	 * 匹配仓库
	 *
	 * @param dto  匹配信息
	 * @param from 调用标志
	 * @return R
	 */
	@PostMapping("/warehouse/match")
	R<String> match(@RequestBody MatchWarehouseDTO dto, @RequestHeader(SecurityConstants.FROM) String from);

}
